package com.yzl.meeting.framework.core.io;

import java.io.IOException;
import java.io.InputStream;

/**
 * @Title: ClassPathResource
 * @Author: 姚志立
 * @Description:
 * @Date: 2020/10/20 16:46
 * @Version: 1.0
 */
public class ClassPathResource implements Resource{
    private String fileName;

    public ClassPathResource(String fileName) {
        this.fileName = fileName;
    }

    @Override
    public InputStream getInputStream() throws IOException {
        InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(fileName);
        return inputStream;
    }
}